<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{:$i->title}</title>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/admin.css" rel="stylesheet" type="text/css" />
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/common/tooltip.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.tooltip.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/jquery.boxy.js"></script>
<script language="javascript" type="text/javascript" src="{:$smarty.const.PUBLIC_DIR}/common/js/common.js"></script>
<link href="{:$smarty.const.PUBLIC_DIR}/common/style/common/boxy.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript">
function selAll(name)
{
	$("input[name='"+name+"']").attr("checked", true);
}

function selAnti(name)
{
	$("input[name='"+name+"']").each(function(i){
		this.checked=!this.checked;
	});
}

function selectIds(name){
	var ids='';
	$("input:checked[name='"+name+"']").each(function(i){
		ids+=this.value+',';
	});
	if(ids.length==0)
	{
		alert('您还没有选中要添加的记录！');
		return false;
	}
	window.parent.{:$i->p[6]}(ids);
	return false;
}
</script>

<style type="text/css">
<!--
body{font-size:12px;color:#000;font-family:Verdana;margin:0;padding:0; background:#fff; width:600px;}
-->
</style>
</head>
<body>
  <div class="content shadow">
    <table width="100%" border="0" cellspacing="1">
      <tr class="titleBg">
        <th scope="col">#ID</th>
        <th scope="col">选择</th>
        <th class="textL" scope="col">标题</th>
      </tr>
      {:foreach item=item from=$i->lists}<tr>
        <td>{:$item->id}</td>
        <td><input name="selected[]" type="checkbox" value="{:$item->id}" class="noBorder" /></td>
        <td class="textL"><a title="{:$item->categoryName} {:$item->pubTime|date_format:"%Y-%m-%d %H:%M"}" href="{:$item->link}" target="_blank">{:$item->title}</a></td>
        </tr>{:/foreach}
      <tr>
        <td colspan="3" class="lightGreyBg textL"><a href="#@" class="buttonBox" onclick="selAll('selected[]');">全选</a> <a href="#@" class="buttonBox" onclick="selAnti('selected[]');">反选</a> <a href="#@" onclick="selectIds('selected[]');return false;" style="background:#e1e1e1;" class="buttonBox" id="addArchive">插入选中的文档</a> {:$i->pagesCode}</td>
      </tr>
    </table>
  </div>
</body>
</html>
